package operation;

import book.BookList;
import com.sun.javaws.exceptions.ExitException;

public class ExitSystem implements Operation{
    @Override
    public void act(BookList bookList) {
        System.out.println("退出系统！");
        int currentSize = bookList.getUsedSize();
        for (int i = 0; i < currentSize; i++) {
            bookList.setBook(i, null);
        }
        bookList.setUsedSize(0);
        System.exit(0);
    }
}
